﻿CREATE FUNCTION [maint].[GetFullBackupSchedule]
(@DbName [sysname])
RETURNS INT
AS
BEGIN
	DECLARE @ReturnValue int

	SELECT
			@ReturnValue = [FullBackupSchedule]
	FROM [config].[DbMaintenance]
	WHERE  ([ServerName] = @@SERVERNAME)
		AND([DbName] = @DbName)

	RETURN(@ReturnValue)
END